package com.teacher.pc.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.teacher.common.CommonResult;
import com.teacher.pojo.dto.certificatetask.CertificateGetDto;
import com.teacher.pojo.vo.certificate.CertificateGetVo;
import com.teacher.service.ICertificateService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 证书申请 前端控制器
 * </p>
 *
 * @author zfm
 * @since 2021-08-13
 */
@RestController
@RequestMapping("/pc/certificate")
public class CertificateController {

    @Autowired
    private ICertificateService iCertificateService;

    /**
     * 查询证书申请
     *
     * @param dto
     * @return
     */
    @ApiOperation("查询证书申请 certificate_get")
    @GetMapping
    @PreAuthorize("hasAuthority('certificate_get')")
    public CommonResult<IPage<CertificateGetVo>> getPage(CertificateGetDto dto) {
        return iCertificateService.getPage(dto);
    }


}

